<template>
 <div class="container">
    <ul>
        <li>
            <span>ID:</span>
            <span>{{this.tableData.organizationUserId}}</span>
        </li>
        <li>
            <span>姓名：</span>
            <span>{{this.tableData.name}}</span>
        </li>
        <li>
            <span>手机号：</span>
            <span>{{this.tableData.phone}}</span>
        </li>
        <li>
            <span>角色：</span>
            <span>{{this.tableData.roleIds}}</span>
        </li>
        <li>
            <span>是否有工具端权限：</span>
            <span>{{this.tableData.status}}</span>
        </li>
    </ul>
 </div>
</template>
<script>
export default {
  data() {
    return {
      tableData: [],
      list:"",
      organizationUserId:"",
      studentId: "",
      name: "",
      phone: "",
      roleNames: "",
      status: ""
    };
  },
  created() {
    this.organizationUserId = location.href.split("=")[1];
    this.getData();
  },
  computed: {
    data() {
      return this.tableData.filter(w => {
        return w;
      });
    }
  },
  methods: {
    // 获取后台数据
    getData() {
      var that = this;
      this.url = "/api/user/xzs/organizationUser.info.get";
      this.$axios({
        url: this.url,
        method: "post",
        data: {
          organizationUserId : that.organizationUserId
        },
        transformRequest: [
              function(data) {
                let ret = "";
                for (let it in data) {
                  ret+=encodeURIComponent(it) +"=" +encodeURIComponent(data[it]) + "&";
                }
                return ret;
              }
            ]
      }).then(res => {
          this.tableData = res.data.data;
        }, err => {
          console.log(err);
        }
      );
    }
  }
};
</script>

<style>
ul,
li {
  list-style: none;
  line-height: 30px;
  font-size: 18px;
}
.container ul li span:nth-child(2){
    font-weight:600; 
}
</style>
